const { VantResolver } = require("@vant/auto-import-resolver");
const ComponentsPlugin = require("unplugin-vue-components/webpack");

module.exports = {
  configureWebpack: {
    plugins: [
      ComponentsPlugin({
        resolvers: [VantResolver()],
      }),
    ],
  },
  devServer: {
    proxy: {
      '/api': {
        target: "http://192.168.0.144:9000/", //跨域地址
        changeOrigin: true, //支持跨域
        // rewrite: (path) => path.replace(/^\/api/, "")//重写路径,替换/api
      }
    }
  }
};
